package com.vito.dcs.trajectory.action;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.dubbo.config.annotation.Reference;
import com.vito.base.authoriza.action.BaseAction;
import com.vito.base.model.ResMsg;
import com.vito.base.model.Result;
import com.vito.dcs.trajectory.service.TransportVehicleService;

/**
 * 
 * 
 * @author zsk
 * @date 2019年4月23日  
 * @version 
 * @Description 查询全部车辆接口
 *
 */
@Controller
@RequestMapping("/dcs/sys/transportVehicle")
public class TransportVehicleAction extends BaseAction{
	
	private static final Logger log = LoggerFactory.getLogger(TransportVehicleAction.class);
   
	@Reference
	private TransportVehicleService transportVehicleServiceImpl;
	
	/**
	 * 
	 * 
	 * @author zsk
	 * @date 2019年4月23日  
	 * @version 
	 * @Description 获取全部车辆信息 
	 *
	 */
	@RequestMapping("getAllTransportVehicle")
	@ResponseBody
	public Result getAllTransportVehicle(){
		Result result = new Result();
		try {
			//调用全部车辆接口
			result.setData(transportVehicleServiceImpl.queryAllTransportVehicle());
			result.setCode(Result.CODE_OK);
		} catch (Exception ex) {
			log.error("查询失败",ex);
			result.setCode(Result.CODE_ERROR);
			result.setMsg(ResMsg.EXECERR);
		}
		return result;
	}
}
